﻿Imports System.Data.OleDb

Public Class ImportItemsBUS
    Private importitemdao As New ImportItemsDAO()
    Public Function ImportItems_List() As DataSet
        Return importitemdao.ImportItems_List()
    End Function

    Public Function ImportItems_Select(ByVal RecordID As Integer) As DataSet
        Return importitemdao.ImportItems_Select(RecordID)
    End Function

    Public Function ImportItems_GetNextImportBill() As Integer
        Return importitemdao.ImportItems_GetNextImportBill()
    End Function

    Public Function ImportItems_GetImportItemID_ByImportBill_ImportItemID(ByVal ImportBill As Integer, _
                                                                          ByVal ImportItemID As Integer) As Integer
        Return importitemdao.ImportItems_GetImportItemID_ByImportBill_ImportItemID(ImportBill, ImportItemID)
    End Function


    Public Function ImportItems_Delete_Temp(ByVal ImportItemID As Integer, _
                                            ByVal ModifiedOn As Date, _
                                            ByVal ModifiedBy As String) As Boolean
        Return importitemdao.ImportItems_Delete_Temp(ImportItemID, ModifiedOn, ModifiedBy)
    End Function

    Public Function ImportItems_Insert(ByVal ImportBill As Integer, _
                                      ByVal TotalQuantity As Integer, _
                                      ByVal TotalBuyPrice As Decimal, _
                                      ByVal VendorID As Integer, _
                                      ByVal PayerID As Integer, _
                                      ByVal Paied As Decimal, _
                                      ByVal debt As Decimal, _
                                      ByVal RateOfExchange As Integer, _
                                      ByVal ImportDate As Date, _
                                      ByVal GTGTTax As Double, _
                                      ByVal CreatedBy As String) As Integer
        Return importitemdao.ImportItems_Insert(ImportBill, TotalQuantity, TotalBuyPrice, VendorID, PayerID, Paied, debt, RateOfExchange, ImportDate, GTGTTax, CreatedBy)
    End Function

    Public Function ImportItems_Update(ByVal ImportBill As Integer, _
                                       ByVal TotalQuantity As Integer, _
                                       ByVal TotalBuyPrice As Decimal, _
                                       ByVal VendorID As Integer, _
                                       ByVal PayerID As Integer, _
                                       ByVal Paied As Decimal, _
                                       ByVal debt As Decimal, _
                                       ByVal RateOfExchange As Integer, _
                                       ByVal ImportDate As Date, _
                                       ByVal GTGTTax As Double, _
                                       ByVal ModifiedBy As String, _
                                       ByVal ImportItemID As Integer) As Boolean
        Return importitemdao.ImportItems_Update(ImportBill, TotalQuantity, TotalBuyPrice, VendorID, PayerID, Paied, debt, RateOfExchange, ImportDate, GTGTTax, ModifiedBy, ImportItemID)
    End Function

    Public Function ImportItems_Tax_Delete(ByVal ImportItemID As Integer) As Boolean
        Return importitemdao.ImportItems_Tax_Delete(ImportItemID)
    End Function

    Public Function ImportItems_DSThu() As DataSet
        Return importitemdao.ImportItems_DSThu()
    End Function

    Public Function ImportItems_Info() As DataSet
        Return importitemdao.ImportItems_Info()
    End Function

    Public Function ImportItems_DSNo() As DataSet
        Return importitemdao.ImportItems_DSNo()
    End Function

    Public Function ImportItems_AccountsPayable_Select(ByVal ImportItemID As Integer) As DataSet
        Return importitemdao.ImportItems_AccountsPayable_Select(ImportItemID)
    End Function

    Public Function ImportItems_AccountsPayable_Group(ByVal VendorID As Integer) As DataSet
        Return importitemdao.ImportItems_AccountsPayable_Group(VendorID)
    End Function

    Public Function ImportItems_TreeView() As DataSet
        Return importitemdao.ImportItems_TreeView()
    End Function

    Public Function ImportItems_Select_AccountsPayable(ByVal RecordID As Integer) As DataSet
        Return importitemdao.ImportItems_Select_AccountsPayable(RecordID)
    End Function









End Class
